//获取应用实例
const app = getApp()
Page({
    data: {
      report:{},
      reportId:"",
      boxId:"",
      report_comment_url:""
    },
    onLoad: function(options) {
      var that=this;
      if (options != null){
        const reportId= options.reportId;
        const boxId= options.boxId;
        const type=options.type;
        const username=app.globalData.localuserinfo.username;
        const access_key=encodeURIComponent(app.globalData.access_key);
        const text=type==='text'?"comment_pdf":"comment_image";
        const url=`${app.globalData.url}/mobile/xcx_login.html?u=${username}&s=${access_key}#/teacher/${text}/${boxId}/${reportId}`;
        console.log("url",url)
        this.setData({report_comment_url:url})
      }
    },
  
})
